/* eslint valid-jsdoc: "off" */

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1709291113710_6642';

  // add your middleware config here
  config.middleware = ["errorHandler"];
  config.security = {
    csrf: {
      enable: false
    },
    domainWhiteList: ["http://localhost:3000"]
  };
  config.cors = {
    origin: "*",
    allowMethods: "GET, PUT, POST, DELETE, PATCH"
  };
  config.sequelize={
    dialect:"mysql",
    host:"127.0.0.1",
    username:"root",
    password:null,
    port:3306,
    database:"egg-wechat",
    timezone:"+08:00",
    define:{
      freezeTableName:true,
      timestamps:true,
      createdAt:"create_at",
      updatedAt:"updated_at",
      underscored:true

    }
 
  }



  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  return {
    ...config,
    ...userConfig,
  };
};
